package com.hsxc.cdz.monitor.bean.pile.v1_21;

import com.hsxc.cdz.base.util.BytesUtil;

/**
 * 
 * @author 刘力文
 * 充电桩上送充电开始的报文类
 *
 */
public class ChargePileMsg extends PileMessage {
	
	private int chargePort;     //充电口号
	private int controll;       //控制类型
	private int limitData;      //开启限制数据
	private String OntimeStart; //定时启动
	private String CardNum;     //用户卡号 
	private String IdentityNum; //车辆识别号
	private String order;       //数据预留位 
	
	public int getChargePort() {
		return chargePort;
	}
	public void setChargePort(int chargePort) {
		this.chargePort = chargePort;
	}
	public int getControll() {
		return controll;
	}
	public void setControll(int controll) {
		this.controll = controll;
	}
	public int getLimitData() {
		return limitData;
	}
	public void setLimitData(int limitData) {
		this.limitData = limitData;
	}
	public String getOntimeStart() {
		return OntimeStart;
	}
	public void setOntimeStart(String ontimeStart) {
		OntimeStart = ontimeStart;
	}
	public String getCardNum() {
		return CardNum;
	}
	public void setCardNum(String cardNum) {
		CardNum = cardNum;
	}
	public String getIdentityNum() {
		return IdentityNum;
	}
	public void setIdentityNum(String identityNum) {
		IdentityNum = identityNum;
	}
	public String getOrder() {
		return order;
	}
	public void setOrder(String order) {
		this.order = order;
	}

	@Override
	public void getContentFromByte(byte[] result1) {
		
		byte[] temp;
        temp = BytesUtil.getByte(0,1,result1);
        this.setChargePort(BytesUtil.bytesToIntSeq(temp));
        
        temp = BytesUtil.getByte(1,1, result1);
        this.setControll(BytesUtil.bytesToIntSeq(temp));
        
        temp = BytesUtil.getByte(2, 4, result1);
        this.setLimitData(BytesUtil.bytesToIntDesc(temp));
        
        temp = BytesUtil.getByte(6, 4, result1);
        this.setOntimeStart(BytesUtil.bcdBytesToStr(temp));
        
        temp = BytesUtil.getByte(10, 10, result1);
        this.setCardNum(BytesUtil.bcdBytesToStr(temp));
        
        temp = BytesUtil.getByte(20, 17, result1);
        this.setIdentityNum(BytesUtil.binBytesToStr(temp));
        
        temp = BytesUtil.getByte(37, 6, result1);
        this.setOrder(BytesUtil.binBytesToStr(temp));
	}

}
